package com.lesson12.staticproxy;

/**
 * @author 朝花不迟暮
 * @version 1.0
 * @date 2020/9/3 9:27
 */
public class TeacherProxy implements ITeacherDao
{
    //构造注入方式
    private ITeacherDao teacherDao;

    public TeacherProxy(ITeacherDao teacherDao)
    {
        this.teacherDao = teacherDao;
    }

    @Override
    public void teach()
    {
        System.out.println("代理开始");
        teacherDao.teach();
        System.out.println("代理结束");
    }
}
